package com.google.wave.bliper.api;

import com.google.wave.api.*;

public class Blip {
	protected RobotMessageBundle bundle;
		
	/**
	 * Default constructor
	 * @param bundle
	 */
	public Blip(RobotMessageBundle bundle){
		this.bundle = bundle;
	}
	
	/**
	 * Add a blip in the wave
	 * @param msg the text to post
	 */
	public void addBlip(String msg){
		bundle.getWavelet().appendBlip().getDocument().append(msg);
	}
	
	/**
	 * Return the email of the blip author
	 */
	public String getCreator(){
		return bundle.getWavelet().appendBlip().getCreator();
	}
	
	/**
	 * Add a reply to the  blip
	 * @param reply Text of the reply
	 */
	public void addReply(String reply){
		bundle.getWavelet().appendBlip().createChild().getDocument().append(reply);
	}
	

}
